package com.qtenv.datasync.service.entity.msmapper;


import com.qtenv.datasync.service.entity.TerminalHistoryData;
import com.qtenv.datasync.service.entity.convert.DataMeterH;
import com.qtenv.datasync.service.entity.convert.FileFlowMeter;
import com.qtenv.datasync.service.entity.degao.DgTerminalArchive;
import com.qtenv.datasync.service.entity.degao.DgTerminalHistory;
import com.qtenv.datasync.service.entity.ningbo.NingBoHistoryData;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.factory.Mappers;

@org.mapstruct.Mapper(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE)
public interface DgTerminalHistoryHMapper {
    DgTerminalHistoryHMapper INSTANCE = Mappers.getMapper(DgTerminalHistoryHMapper.class);

    @Mappings({
            @Mapping(source = "dgTerminalHistory.id", target = "ID"),
            @Mapping(source = "dgTerminalHistory.userTerminals", target = "FFM_ID"),
            @Mapping(source = "dgTerminalHistory.readNumber", target = "ZX_FLOW"),
            @Mapping(source = "dgTerminalHistory.reverseNumber", target = "FX_FLOW"),
            @Mapping(source = "dgTerminalHistory.instantNumber", target = "SS_FLOW"),
            @Mapping(source = "dgTerminalHistory.totalFlow", target = "TOTAL_FLOW"),
            @Mapping(source = "dgTerminalHistory.terminalVol", target = "PIPE_VOLTAGE"),
            @Mapping(source = "dgTerminalHistory.pressure", target = "PIPE_PRESSURE"),
            @Mapping(source = "dgTerminalHistory.readDate", target = "CREATE_DATE"),
            @Mapping(source = "dgTerminalHistory.readDate", target = "FREEZE_DATE"),
    })
    DataMeterH toDataMeterH(String tenantId, DgTerminalHistory dgTerminalHistory);
}
